package com.java.common.pojo;

/**
 * JobPermissionId entity. @author MyEclipse Persistence Tools
 */

public class JobPermissionId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 455760911971587303L;
	private Job job;
	private Permission permission;

	// Constructors

	/** default constructor */
	public JobPermissionId() {
	}

	/** full constructor */
	public JobPermissionId(Job job, Permission permission) {
		this.job = job;
		this.permission = permission;
	}

	// Property accessors

	public Job getJob() {
		return this.job;
	}

	public void setJob(Job job) {
		this.job = job;
	}

	public Permission getPermission() {
		return this.permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof JobPermissionId))
			return false;
		JobPermissionId castOther = (JobPermissionId) other;

		return ((this.getJob() == castOther.getJob()) || (this.getJob() != null
				&& castOther.getJob() != null && this.getJob().equals(
				castOther.getJob())))
				&& ((this.getPermission() == castOther.getPermission()) || (this
						.getPermission() != null
						&& castOther.getPermission() != null && this
						.getPermission().equals(castOther.getPermission())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getJob() == null ? 0 : this.getJob().hashCode());
		result = 37
				* result
				+ (getPermission() == null ? 0 : this.getPermission()
						.hashCode());
		return result;
	}

}